package com.nbjtjc.safe.model.danger;

import com.nbjtjc.common.validator.group.UpdateGroup;
import com.nbjtjc.safe.activiti.model.ActivitiParams;
import com.nbjtjc.safe.bean.Page;
import com.nbjtjc.safe.model.sys.SysFile;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Table(name = "danger_inspect_public")
public class DangerInspectPublic extends Page {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NotNull(message = "更新或者删除时不能为空", groups = {UpdateGroup.class})
    private Integer id;

    /**
     * 检查单编号
     */
    @Column(name = "check_num")
    private String checkNum;

    /**
     * 发布单位的公司id
     */
    @Column(name = "public_company_id")
    private Integer publicCompanyId;
    /**
     * 发起检查的部门id
     */
    @Column(name = "public_dept_id")
    private Integer publicDeptId;

    /**
     * 发起检查的部门编码，唯一
     */
    @Column(name = "public_dept_code")
    private String publicDeptCode;

    /**
     * 表名字
     */
    @NotBlank(message = "表名字不能为空，添加时")
    private String name;

    /**
     * 说明
     */
    @Column(name = "explains")
    private String explains;

    @Column(name = "create_time")
    private Date createTime;

    /**
     * 创建者id
     */
    @Column(name = "create_user_id")
    private Integer createUserId;

    /**
     * 被检查的部门的id
     */
    @Column(name = "target_dept_id")
    @NotNull(message = "被检查的部门的id不能为空")
    private Integer targetDeptId;

    /**
     * 接受检查的部门的编码
     */
    @Column(name = "target_dept_code")
    private String targetDeptCode;

    /**
     * 检查日期
     */
    @Column(name = "inspect_date")
    private Date inspectDate;

    /**
     * 预计检查日期
     */
    @Column(name = "predict_inspect_date")
    private Date predictInspectDate;

    /**
     * 检查表的状态,0
     */
    private Integer status;

    /**
     * 检查类型
     */
    @Column(name = "inspect_type")
    private String inspectType;

    @Column(name = "inspect_id")
    @NotNull(message = "检查模板表的id不能为空")
    private Integer inspectId;

    /**
     * 检查组组长的id
     */
    @Column(name = "leader_user_id")
    private Integer leaderUserId;

    /**
     * 0表示自查，1表示被检查,2表示督查或者排查
     */
    private Integer type;

    @Column(name = "distribute_id")
    private Integer distributeId;

    @Column(name = "start_distribute_id")
    private Integer startDistributeId;

    /**
     * 整改回执
     */
    @Column(name = "reform_reply")
    private String reformReply;

    /**
     * 负责人id
     */
    @Column(name = "reform_charge_user_id")
    private Integer reformChargeUserId;

    /**
     * 整改完成事件
     */
    @Column(name = "reform_time")
    private Date reformTime;

    /**
     * 受检单位承办人
     */
    @Column(name = "target_contractor_user_id")
    private Integer targetContractorUserId;

    /**
     * 受检单位现场负责人
     */
    @Column(name = "target_live_charge_user")
    private String targetLiveChargeUser;
    @Column(name = "need_feedback")
    private Integer needFeedback;
    @Column(name = "examine_user_id")
    private Integer examineUserId;
    /**
     * 验收时间
     */
    @Column(name = "accept_time")
    private Date acceptTime;

    /**
     * 隐患整改单审核时间
     */
    @Column(name = "danger_check_time")
    private Date dangerCheckTime;

    private Boolean finish;
    /**
     * 流程实例id
     */
    @Column(name = "process_instance_id")
    private String processInstanceId;

    private String note;
    /**
     * 0我的检查表1公司检查表2公共检查表
     */
    @Column(name="table_type")
    private Integer tableType;
    @Column(name = "check_user_id")
    private Integer checkUserId;

    @Column(name="inspect_task_id")
    private Integer inspectTaskId;

    @Column(name="inspect_plan_id")
    private Integer inspectPlanId;

    /**
     * 0表示创建plan时，task对应生成的表，1表示后面添加的表
     */
    @Column(name="table_from")
    private Integer tableFrom;
    @Transient
    private String checkUserName;
    @Transient
    private String examineUsername;
    @Transient
    private String reformChargeUsername;
    @Transient
    private SafeDangerInspectLabel label = new SafeDangerInspectLabel();



    @Transient
    private String targetContractorUserName;
    @Transient
    private String createUserName;
    @Transient
    private String targetDeptName;
    @Transient
    private String publicDeptName;
    @Transient
    private String leaderUserName;

    @Transient
    private String reformTimeStr;
    @Transient
    private List<DangerInspectListPublic> dangerInspectListPublicList = new ArrayList<>();

    @Transient
    private List<DangerInspectMember> dangerInspectMembers = new ArrayList<>();
    @Transient
    private List<DangerReformReply> dangerReformReplies=new ArrayList<>();
    @Transient
    private ArrayList<String> labels = new ArrayList<>();

    @Transient
    private List<SysFile> attachments = new ArrayList<>();

    @Transient
    private List<Integer> statuses=new ArrayList<>();

    @Transient
    private ActivitiParams activitiParams=new ActivitiParams();
    @Transient
    private String statusName;

    @Transient
    private Boolean overTimeFlag=false;

    @Transient
    private Integer taskId=0;


    public Integer getTableFrom() {
        return tableFrom;
    }

    public void setTableFrom(Integer tableFrom) {
        this.tableFrom = tableFrom;
    }

    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Integer getTableType() {
        return tableType;
    }

    public void setTableType(Integer tableType) {
        this.tableType = tableType;
    }

    public Integer getInspectTaskId() {
        return inspectTaskId;
    }

    public void setInspectTaskId(Integer inspectTaskId) {
        this.inspectTaskId = inspectTaskId;
    }

    public Integer getInspectPlanId() {
        return inspectPlanId;
    }

    public void setInspectPlanId(Integer inspectPlanId) {
        this.inspectPlanId = inspectPlanId;
    }

    public Boolean getOverTimeFlag() {
        return overTimeFlag;
    }

    public void setOverTimeFlag(Boolean overTimeFlag) {
        this.overTimeFlag = overTimeFlag;
    }

    public Boolean getFinish() {
        return finish;
    }

    public void setFinish(Boolean finish) {
        this.finish = finish;
    }

    public String getCheckUserName() {
        return checkUserName;
    }

    public void setCheckUserName(String checkUserName) {
        this.checkUserName = checkUserName;
    }

    public Integer getCheckUserId() {
        return checkUserId;
    }

    public void setCheckUserId(Integer checkUserId) {
        this.checkUserId = checkUserId;
    }

    public Integer getPublicCompanyId() {
        return publicCompanyId;
    }

    public void setPublicCompanyId(Integer publicCompanyId) {
        this.publicCompanyId = publicCompanyId;
    }

    public List<DangerReformReply> getDangerReformReplies() {
        return dangerReformReplies;
    }

    public void setDangerReformReplies(List<DangerReformReply> dangerReformReplies) {
        this.dangerReformReplies = dangerReformReplies;
    }

    public String getTargetLiveChargeUser() {
        return targetLiveChargeUser;
    }

    public void setTargetLiveChargeUser(String targetLiveChargeUser) {
        this.targetLiveChargeUser = targetLiveChargeUser;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public ActivitiParams getActivitiParams() {
        return activitiParams;
    }

    public void setActivitiParams(ActivitiParams activitiParams) {
        this.activitiParams = activitiParams;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public List<Integer> getStatuses() {
        return statuses;
    }

    public void setStatuses(List<Integer> statuses) {
        this.statuses = statuses;
    }

    public Date getDangerCheckTime() {
        return dangerCheckTime;
    }

    public void setDangerCheckTime(Date dangerCheckTime) {
        this.dangerCheckTime = dangerCheckTime;
    }

    public Date getAcceptTime() {
        return acceptTime;
    }

    public void setAcceptTime(Date acceptTime) {
        this.acceptTime = acceptTime;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public List<SysFile> getAttachments() {
        return attachments;
    }

    public void setAttachments(List<SysFile> attachments) {
        this.attachments = attachments;
    }

    public String getReformChargeUsername() {
        return reformChargeUsername;
    }

    public void setReformChargeUsername(String reformChargeUsername) {
        this.reformChargeUsername = reformChargeUsername;
    }

    public String getExamineUsername() {
        return examineUsername;
    }

    public void setExamineUsername(String examineUsername) {
        this.examineUsername = examineUsername;
    }

    public Integer getExamineUserId() {
        return examineUserId;
    }

    public void setExamineUserId(Integer examineUserId) {
        this.examineUserId = examineUserId;
    }

    public DangerInspectPublic() {
    }

    public DangerInspectPublic(int id) {
        this.id = id;
    }

    public String getReformTimeStr() {
        return reformTimeStr;
    }

    public void setReformTimeStr(String reformTimeStr) {
        this.reformTimeStr = reformTimeStr;
    }


    public Integer getNeedFeedback() {
        return needFeedback;
    }

    public void setNeedFeedback(Integer needFeedback) {
        this.needFeedback = needFeedback;
    }

    public String getLeaderUserName() {
        return leaderUserName;
    }

    public void setLeaderUserName(String leaderUserName) {
        this.leaderUserName = leaderUserName;
    }

    public ArrayList<String> getLabels() {
        return labels;
    }

    public void setLabels(ArrayList<String> labels) {
        this.labels = labels;
    }

    public SafeDangerInspectLabel getLabel() {
        return label;
    }

    public void setLabel(SafeDangerInspectLabel label) {
        this.label = label;
    }

    public String getTargetDeptName() {
        return targetDeptName;
    }

    public void setTargetDeptName(String targetDeptName) {
        this.targetDeptName = targetDeptName;
    }

    public String getPublicDeptName() {
        return publicDeptName;
    }

    public void setPublicDeptName(String publicDeptName) {
        this.publicDeptName = publicDeptName;
    }


    public String getTargetContractorUserName() {
        return targetContractorUserName;
    }

    public void setTargetContractorUserName(String targetContractorUserName) {
        this.targetContractorUserName = targetContractorUserName;
    }

    public Integer getTargetContractorUserId() {
        return targetContractorUserId;
    }

    public void setTargetContractorUserId(Integer targetContractorUserId) {
        this.targetContractorUserId = targetContractorUserId;
    }



    public List<DangerInspectMember> getDangerInspectMembers() {
        return dangerInspectMembers;
    }

    public void setDangerInspectMembers(List<DangerInspectMember> dangerInspectMembers) {
        this.dangerInspectMembers = dangerInspectMembers;
    }

    public List<DangerInspectListPublic> getDangerInspectListPublicList() {
        return dangerInspectListPublicList;
    }

    public void setDangerInspectListPublicList(List<DangerInspectListPublic> dangerInspectListPublicList) {
        this.dangerInspectListPublicList = dangerInspectListPublicList;
    }

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取检查单编号
     *
     * @return check_num - 检查单编号
     */
    public String getCheckNum() {
        return checkNum;
    }

    /**
     * 设置检查单编号
     *
     * @param checkNum 检查单编号
     */
    public void setCheckNum(String checkNum) {
        this.checkNum = checkNum;
    }

    /**
     * 获取发起检查的部门id
     *
     * @return public_dept_id - 发起检查的部门id
     */
    public Integer getPublicDeptId() {
        return publicDeptId;
    }

    /**
     * 设置发起检查的部门id
     *
     * @param publicDeptId 发起检查的部门id
     */
    public void setPublicDeptId(Integer publicDeptId) {
        this.publicDeptId = publicDeptId;
    }

    /**
     * 获取发起检查的部门编码，唯一
     *
     * @return public_dept_code - 发起检查的部门编码，唯一
     */
    public String getPublicDeptCode() {
        return publicDeptCode;
    }

    /**
     * 设置发起检查的部门编码，唯一
     *
     * @param publicDeptCode 发起检查的部门编码，唯一
     */
    public void setPublicDeptCode(String publicDeptCode) {
        this.publicDeptCode = publicDeptCode;
    }

    /**
     * 获取表名字
     *
     * @return name - 表名字
     */
    public String getName() {
        return name;
    }

    /**
     * 设置表名字
     *
     * @param name 表名字
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取说明
     *
     * @return explain - 说明
     */
    public String getExplains() {
        return explains;
    }

    /**
     * 设置说明
     *
     * @param explains 说明
     */
    public void setExplains(String explains) {
        this.explains = explains;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取创建者id
     *
     * @return create_user_id - 创建者id
     */
    public Integer getCreateUserId() {
        return createUserId;
    }

    /**
     * 设置创建者id
     *
     * @param createUserId 创建者id
     */
    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * 获取被检查的部门的id
     *
     * @return target_dept_id - 被检查的部门的id
     */
    public Integer getTargetDeptId() {
        return targetDeptId;
    }

    /**
     * 设置被检查的部门的id
     *
     * @param targetDeptId 被检查的部门的id
     */
    public void setTargetDeptId(Integer targetDeptId) {
        this.targetDeptId = targetDeptId;
    }

    /**
     * 获取接受检查的部门的编码
     *
     * @return target_dept_code - 接受检查的部门的编码
     */
    public String getTargetDeptCode() {
        return targetDeptCode;
    }

    /**
     * 设置接受检查的部门的编码
     *
     * @param targetDeptCode 接受检查的部门的编码
     */
    public void setTargetDeptCode(String targetDeptCode) {
        this.targetDeptCode = targetDeptCode;
    }

    /**
     * 获取检查日期
     *
     * @return inspect_date - 检查日期
     */
    public Date getInspectDate() {
        return inspectDate;
    }

    /**
     * 设置检查日期
     *
     * @param inspectDate 检查日期
     */
    public void setInspectDate(Date inspectDate) {
        this.inspectDate = inspectDate;
    }

    /**
     * 获取预计检查日期
     *
     * @return predict_inspect_date - 预计检查日期
     */
    public Date getPredictInspectDate() {
        return predictInspectDate;
    }

    /**
     * 设置预计检查日期
     *
     * @param predictInspectDate 预计检查日期
     */
    public void setPredictInspectDate(Date predictInspectDate) {
        this.predictInspectDate = predictInspectDate;
    }

    /**
     * 获取检查表的状态,0
     *
     * @return status - 检查表的状态,0
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置检查表的状态,0
     *
     * @param status 检查表的状态,0
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取检查类型
     *
     * @return inspect_type - 检查类型
     */
    public String getInspectType() {
        return inspectType;
    }

    /**
     * 设置检查类型
     *
     * @param inspectType 检查类型
     */
    public void setInspectType(String inspectType) {
        this.inspectType = inspectType;
    }

    /**
     * @return inspect_id
     */
    public Integer getInspectId() {
        return inspectId;
    }

    /**
     * @param inspectId
     */
    public void setInspectId(Integer inspectId) {
        this.inspectId = inspectId;
    }

    /**
     * 获取检查组组长的id
     *
     * @return leader_user_id - 检查组组长的id
     */
    public Integer getLeaderUserId() {
        return leaderUserId;
    }

    /**
     * 设置检查组组长的id
     *
     * @param leaderUserId 检查组组长的id
     */
    public void setLeaderUserId(Integer leaderUserId) {
        this.leaderUserId = leaderUserId;
    }

    /**
     * 获取0表示自查，1表示被检查
     *
     * @return type - 0表示自查，1表示被检查
     */
    public Integer getType() {
        return type;
    }

    /**
     * 设置0表示自查，1表示被检查
     *
     * @param type 0表示自查，1表示被检查
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * @return distribute_id
     */
    public Integer getDistributeId() {
        return distributeId;
    }

    /**
     * @param distributeId
     */
    public void setDistributeId(Integer distributeId) {
        this.distributeId = distributeId;
    }

    /**
     * @return start_distribute_id
     */
    public Integer getStartDistributeId() {
        return startDistributeId;
    }

    /**
     * @param startDistributeId
     */
    public void setStartDistributeId(Integer startDistributeId) {
        this.startDistributeId = startDistributeId;
    }

    /**
     * 获取整改回执
     *
     * @return reform_reply - 整改回执
     */
    public String getReformReply() {
        return reformReply;
    }

    /**
     * 设置整改回执
     *
     * @param reformReply 整改回执
     */
    public void setReformReply(String reformReply) {
        this.reformReply = reformReply;
    }

    /**
     * 获取负责人id
     *
     * @return reform_charge_user_id - 负责人id
     */
    public Integer getReformChargeUserId() {
        return reformChargeUserId;
    }

    /**
     * 设置负责人id
     *
     * @param reformChargeUserId 负责人id
     */
    public void setReformChargeUserId(Integer reformChargeUserId) {
        this.reformChargeUserId = reformChargeUserId;
    }

    /**
     * 获取整改完成事件
     *
     * @return reform_time - 整改完成事件
     */
    public Date getReformTime() {
        return reformTime;
    }

    /**
     * 设置整改完成事件
     *
     * @param reformTime 整改完成事件
     */
    public void setReformTime(Date reformTime) {
        this.reformTime = reformTime;
    }
}